<?php

class MyStringUtil {
	public static function MyLcfirst($str) {
		if ($str == null || $str == "") {
			return "";
		}
		return strtolower ( substr ( $str, 0, 1 ) ) . substr ( $str, 1 );
	}
	public static function CoverColumnToAttribute($columnName) {
		$str = strtok ( $columnName, " " );
		if ($str == null) {
			return "";
		}
		$re = MyStringUtil::MyLcfirst ( $str );
		$str = strtok ( " " );
		while ( $str != null ) {
			$re .= ucfirst ( $str );
			$str = strtok ( " " );
		}
		return $re;
	}
	
	public static function Tokenizer($str, $sp) {
		$re = array ();
		$k = strtok ( $str, $sp );
		for($i1 = 0; $k != null; $i1 ++) {
			$re [$i1] = $k;
			$k = strtok ( $sp );
		
		}
		return $re;
	
	}

}

?>